﻿<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ page import="com.util.SuperString" %>
<%@ page import="com.util.SuperFile" %>
<%@ page import="com.util.SuperPage" %>
<%@ page import="com.mtbu.dao.DAOManager" %>
<%@ page import="com.mtbu.comm.Util" %>
<%@ page import="com.mtbu.bean.*"%>
<% session.setAttribute("cache","y"); %>
<%@include file="sys_commcheck.jsp"%>
<%
    System.out.println("request:" + request.getRequestURI());
    System.out.println("request:" + SuperPage.getCurURL(request));

    String act = SuperString.notNullTrim(request.getParameter("act"));
    if(!act.equalsIgnoreCase("mod")) act = "add";
    boolean isAdd = act.equalsIgnoreCase("add");
    boolean isMod = act.equalsIgnoreCase("mod");
    String titletext = isAdd ? "新增" : "修改";

    String curFile = SuperPage.getCurURLFile(request);
    String modFileDo = SuperFile.getFileName(curFile) + "do.jsp";
    String curName = "Protocol";

    int id = SuperString.getInt(request.getParameter("id"));

    if(!isAdd && id <= 0) {
        Util.callInfo("错误的调用方法！", request, response);
        return;
    }

    Protocol record = isMod? DAOManager.protocolDao.findProtocol(id):new Protocol();
    if(isMod && record==null){
        Util.callInfo("数据不存在！", request, response);
        return;
    }
    String strOnSubmit = SuperPage.getOnSubmitCode("tvname,R", "");

%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>无标题文档</title>
<link href="css/common.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/comm.js"></script>

</head>

<body>
<div class="title_text"><%=curName%>维护</div>

<div class="clear"><span/></div>

<table width="100%"  border="0" cellspacing="1" cellpadding="2">
  <tr>
    <td align="right"><input name="Submit22" type="button" class="BUTTON3" value="   返回上页   " onClick="history.go(-1);"></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="table_bord">
  <tr class="table_bord_ttl">
    <td><%=titletext+curName%></td>
  </tr>
  <tr class="tr_class1">
    <td><form name="form" method="post" action="<%=modFileDo%><%=SuperPage.getQueryQ(request,"")%>" <%=strOnSubmit%>>
    <table width="100%"  border="0" cellspacing="1" cellpadding="2">
      <tr>
        <td width="13%">&nbsp;</td>
        <td width="81%">&nbsp;</td>
        <td width="6%">&nbsp;</td>
      </tr>
      <tr>
        <td height="22" align="right">Platform：</td>
        <td><input name="platform" type="text" size="50" maxlength="255" id="hv" value="<%=record.getPlatform()%>" title="平台"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="22" align="right">HV：</td>
        <td><input name="hv" type="text" size="50" maxlength="255" id="hv" value="<%=record.getHV()%>" title="硬件版本"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="22" align="right">OSV：</td>
        <td><input name="osv" type="text" size="50" maxlength="255" id="osv" value="<%=record.getOSV()%>" title="操作系统"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="22" align="right">SV：</td>
        <td><input name="sv" type="text" size="50" maxlength="255" id="sv" value="<%=record.getSV()%>" title="软件版本号"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="22" align="right">PlayType：</td>
        <td><input name="playtype" type="text" size="50" maxlength="255" id="sv" value="<%=record.getPlayType()%>" title="PlayType"></td>
        <td>&nbsp;</td>
      </tr>


        <td align="center">&nbsp;</td>
        <td height="30"> <input name="Submit" type="submit" class="BUTTON2" value=" 提 交 ">
          <input name="Submit" type="button" class="BUTTON2" value=" 取 消 " onClick="history.back(1)"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td align="center">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
      </form></td>
  </tr>
</table>
<br>
</body>
</html>
